New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for configuring multiple OH targets #1900
Conversation
This is mostly finished, but the configuration UI needs more work (e.g. confirmation prompts when leaving without saving or deleting servers; also some sort of error indication on incomplete server configurations). |
mobile/src/main/java/org/openhab/habdroid/core/UpdateBroadcastReceiver.kt
Outdated
Show resolved
Hide resolved
I few UI suggestions:
The default sitemaps of all servers are always directly selectable, but HABPanel, notifications and NFC only from the selected server.
Things that need to be updated for multi server support:
And a small feature request:
|
Makes sense.
I really don't want to move UI controls based on some (from a user POV) unrelated setting. Besides the (IMHO unnecessary) complication it feels just inconsistent and 'magic' to me.
This seems questionable to me, since I don't think it's clear the user wants to check notifications on server B after he just checked server A. What does Gmail (or other Google app) do in that case?
IMHO unneeded and clutter since the current server name is readily available in the drawer.
Indeed.
Right, but what to do with existing ones, and what to do with shortcuts belonging to a server when that server is removed?
Same as for shortcuts.
Uh, here it starts getting ugly. Automatically sending it to all servers may be a privacy concern, but I don't see how it should work otherwise.
Connection 0 should be 'active server', but yeah, makes sense.
I would make it stop on the first found server as it's always been the case. If the loading indicator doesn't go away, that's a bug.
Maybe in a later PR ... I'd try to keep it simple for now. |
IMO the drawer should always show only one sitemap and IMO if that's the case, there is enough space for the default sitemaps of the other servers.
I haven't check yet if it's easily possible to update existing shortcuts and widgets. If so: Add the server id, if not
They could be moved to the server preference or simply add a switch to the server prefs with "Send device information to this server" which is enabled by default.
Probably better. Two servers at the same wifi aren't that common.
Sure. |
That we can compromise on :-) |
More points:
|
A quite simple way would be to have a primary server and make some features for this server only. Then these features could be made multi server compatible in small patches.
Show it in the server settings?
One (summary) notification for each server? Or we show notifications from all servers in the notification fragment. The shown priority could be replaced with the server name. |
The thing is, I don't think we can detect what server (or rather login) an FCM message came from.
Can't meaningfully do that due to the paging. The more I think about it, and the more features we discover that need adaption, the more I wonder whether all that effort is worth it :-/ I really would be interested how large the part of our user base is who maintains more than one server. |
I use two openHAB server at different locations.
Maybe we should really add a pref to set a server as primary and only update a few features, that can be done quite simple (NFC, widgets, shortcuts). If I could view Sitemaps of other servers I would be quite satisfied. |
I also run openhab in two locations. My primary home and also my holiday house. It would be great to get this finalised and included - my current workaround is to install both the 'openhab' and 'openhab beta' app on my phone. |
@maniac103 Can I help you with coding for the PR? IMO it would be fine to
After that the missing features can be ported to be multi server compatible in separate PRs. For people having multiple servers, but are connected most of the time with their primary one, just viewing sitemaps is good enough. |
* Add confirmation dialog for deletion * Mark 'add server' pref as beta * Fix default sitemap selection * Other small improvements Fixes #10 Closes openhab#1900 Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com>
Another dual-home Openhaber here. A small twist -- the two sites are connected by a site-to-site VPN. My current workarounds:
|
* Add confirmation dialog for deletion * Mark 'add server' pref as beta * Fix default sitemap selection * Other small improvements Fixes openhab#10 Closes openhab#1900 Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com>
c54705a
to
66eb52e
Compare
Currently |
* Add confirmation dialog for deletion * Mark 'add server' pref as beta * Fix default sitemap selection * Other small improvements Fixes openhab#10 Closes openhab#1900 Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com>
6ea813d
to
159a865
Compare
I'll look into that. |
Done. Questions I came across when implementing this:
|
For now the items should be fetched from the primary server. I'm going to adapt
I wouldn't change the active server, but change the title.
Yes, that's definitely needed. I'd add a dialog when trying the exit the fragment with unsaved changes. |
mobile/src/main/java/org/openhab/habdroid/core/connection/ConnectionFactory.kt
Show resolved
Hide resolved
* Add confirmation dialog for deletion * Mark 'add server' pref as beta * Fix default sitemap selection * Other small improvements Fixes #10 Closes openhab#1900 Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com>
Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com>
Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com>
Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com>
Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com>
Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com>
Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com>
Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com>
Signed-off-by: Danny Baumann <dannybaumann@web.de>
Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com>
Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com>
Signed-off-by: Danny Baumann <dannybaumann@web.de>
Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com>
Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com>
Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com> Signed-off-by: Danny Baumann <dannybaumann@web.de>
Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com>
Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com>
Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com>
Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com>
Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com>
Signed-off-by: Danny Baumann <dannybaumann@web.de>
Signed-off-by: Danny Baumann <dannybaumann@web.de>
Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com>
c9e1ff5
to
b8def84
Compare
Thanks for all the work on this, looks good to me with my limited testing |
Equipped family members in DE and US with individual OH instances, aside of my own installation with >100 things + >1.300 items. Up until now I used released app for remote OHs (reconfiguring connections) + beta app for my system. What a great achievement to have multiple OHs in a single app supported. Thank you. |
Only one can be active at a time, though. Selection of targets happens via toggle in the navigation drawer.
Closes #10